<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>liqianfei</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="暂无描述">
<meta property="og:type" content="website">
<meta property="og:title" content="liqianfei">
<meta property="og:url" content="https://liqianfei.gitee.io/webolg/index.html">
<meta property="og:site_name" content="liqianfei">
<meta property="og:description" content="暂无描述">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="Liqianfei">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/atom.xml" title="liqianfei" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/css/style.css">

<meta name="generator" content="Hexo 4.2.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">liqianfei</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">进击的小乾端</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://liqianfei.gitee.io/webolg"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main">
  
    <article id="post-history和hash的区别" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/03/06/history%E5%92%8Chash%E7%9A%84%E5%8C%BA%E5%88%AB/" class="article-date">
  <time datetime="2020-03-06T09:27:31.266Z" itemprop="datePublished">2020-03-06</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2020/03/06/history%E5%92%8Chash%E7%9A%84%E5%8C%BA%E5%88%AB/">history和hash的区别</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="Vue-router中hash模式和history模式的区别"><a href="#Vue-router中hash模式和history模式的区别" class="headerlink" title="Vue-router中hash模式和history模式的区别"></a>Vue-router中hash模式和history模式的区别</h1><h2 id="参考文章"><a href="#参考文章" class="headerlink" title="参考文章"></a>参考文章</h2><p><a href="https://www.jb51.net/article/144341.htm" target="_blank" rel="noopener">1.Vue-router 中hash模式和history模式的区别</a></p>
<p><a href="https://segmentfault.com/a/1190000019410139?utm_source=tag-newest" target="_blank" rel="noopener">2.history和hash详解</a></p>
<p>1.在vue的路由配置中有mode选项 最直观的区别就是在url中 hash 带了一个很丑的 # 而history是没有#的</p>
<p>2.history只能兼容到IE10，hash兼容到IE8</p>
<p>3.对于vue这类渐进式的前端开发框架，为了构建spa单页面应用，需要引入前端路由系统，也就是vue-router存在的意义。前端路由的核心就在于—改变视图的同时不会向后端发出请求。 </p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://liqianfei.gitee.io/webolg/2020/03/06/history%E5%92%8Chash%E7%9A%84%E5%8C%BA%E5%88%AB/" data-id="ck7g1nd730001iswm3rzs6f7z" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  
    <article id="post-本地浏览器设置跨域" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/03/06/%E6%9C%AC%E5%9C%B0%E6%B5%8F%E8%A7%88%E5%99%A8%E8%AE%BE%E7%BD%AE%E8%B7%A8%E5%9F%9F/" class="article-date">
  <time datetime="2020-03-06T09:27:31.261Z" itemprop="datePublished">2020-03-06</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2020/03/06/%E6%9C%AC%E5%9C%B0%E6%B5%8F%E8%A7%88%E5%99%A8%E8%AE%BE%E7%BD%AE%E8%B7%A8%E5%9F%9F/">本地浏览器设置跨域</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="说明：本来浏览器设置了本地可跨域后，在测试过程中的问题"><a href="#说明：本来浏览器设置了本地可跨域后，在测试过程中的问题" class="headerlink" title="说明：本来浏览器设置了本地可跨域后，在测试过程中的问题"></a>说明：本来浏览器设置了本地可跨域后，在测试过程中的问题</h2><h3 id="出现的问题："><a href="#出现的问题：" class="headerlink" title="出现的问题："></a>出现的问题：</h3><blockquote>
<p>pc能正常访问接口，真机不能正常访问</p>
</blockquote>
<h3 id="出现问题的原因："><a href="#出现问题的原因：" class="headerlink" title="出现问题的原因："></a>出现问题的原因：</h3><blockquote>
<p>pc浏览器设置跨域，能正常访问（仅限本地测试访问），实践上是不应该访问到的。</p>
</blockquote>
<h3 id="解决方案：在真实情况下处理跨域问题"><a href="#解决方案：在真实情况下处理跨域问题" class="headerlink" title="解决方案：在真实情况下处理跨域问题"></a>解决方案：在真实情况下处理跨域问题</h3><blockquote>
<p><img src="img/1.jpg" alt="浏览器属性"></p>
</blockquote>
<h3 id="代码："><a href="#代码：" class="headerlink" title="代码："></a>代码：</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"</span> --<span class="built_in">disable</span>-web-security --user-data-dir</span><br></pre></td></tr></table></figure>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://liqianfei.gitee.io/webolg/2020/03/06/%E6%9C%AC%E5%9C%B0%E6%B5%8F%E8%A7%88%E5%99%A8%E8%AE%BE%E7%BD%AE%E8%B7%A8%E5%9F%9F/" data-id="ck7g1nd7d0002iswmg10d8on8" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  
    <article id="post-hello-world" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/03/06/hello-world/" class="article-date">
  <time datetime="2020-03-06T09:12:44.348Z" itemprop="datePublished">2020-03-06</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 itemprop="name">
      <a class="article-title" href="/2020/03/06/hello-world/">Hello World</a>
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>

<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="noopener">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>

<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="noopener">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>

<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="noopener">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>

<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html" target="_blank" rel="noopener">Deployment</a></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://liqianfei.gitee.io/webolg/2020/03/06/hello-world/" data-id="ck7g1nd6z0000iswm4s1ce7pt" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
</article>


  


</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/03/">March 2020</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2020/03/06/history%E5%92%8Chash%E7%9A%84%E5%8C%BA%E5%88%AB/">history和hash的区别</a>
          </li>
        
          <li>
            <a href="/2020/03/06/%E6%9C%AC%E5%9C%B0%E6%B5%8F%E8%A7%88%E5%99%A8%E8%AE%BE%E7%BD%AE%E8%B7%A8%E5%9F%9F/">本地浏览器设置跨域</a>
          </li>
        
          <li>
            <a href="/2020/03/06/hello-world/">Hello World</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2020 Liqianfei<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">

  
<script src="/fancybox/jquery.fancybox.pack.js"></script>




<script src="/js/script.js"></script>




  </div>
</body>
</html>